using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace SailHero.Soft.FrameWork.Models.Mapping.AUTHCODEDBORA
{
    public class SYS_SOFTAUTHKEYMap : EntityTypeConfiguration<SYS_SOFTAUTHKEY>
    {
        public SYS_SOFTAUTHKEYMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.SOFTID)
                .HasMaxLength(50);

            this.Property(t => t.WPLACE)
                .HasMaxLength(500);

            this.Property(t => t.MCODEFILE)
                .HasMaxLength(500);

            this.Property(t => t.SKEYFILE)
                .HasMaxLength(500);

            this.Property(t => t.MACHINECODE)
                .HasMaxLength(2000);

            this.Property(t => t.SOFTNO)
                .HasMaxLength(50);

            this.Property(t => t.CPUID)
                .HasMaxLength(50);

            this.Property(t => t.MAC)
                .HasMaxLength(50);

            this.Property(t => t.ISENABLE)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.CREATOR)
                .HasMaxLength(50);

            this.Property(t => t.UPDATEUSER)
                .HasMaxLength(50);

            this.Property(t => t.SOFTVERSION)
                .HasMaxLength(200);

            this.Property(t => t.DETAILPLACE)
                .HasMaxLength(1000);

            this.Property(t => t.CUSTOMER)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("SYS_SOFTAUTHKEY", "LYHADMIN");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.SOFTID).HasColumnName("SOFTID");
            this.Property(t => t.WPLACE).HasColumnName("WPLACE");
            this.Property(t => t.MCODEFILE).HasColumnName("MCODEFILE");
            this.Property(t => t.SKEYFILE).HasColumnName("SKEYFILE");
            this.Property(t => t.MACHINECODE).HasColumnName("MACHINECODE");
            this.Property(t => t.SOFTNO).HasColumnName("SOFTNO");
            this.Property(t => t.CPUID).HasColumnName("CPUID");
            this.Property(t => t.MAC).HasColumnName("MAC");
            this.Property(t => t.ISENABLE).HasColumnName("ISENABLE");
            this.Property(t => t.CREATOR).HasColumnName("CREATOR");
            this.Property(t => t.CREATEDATE).HasColumnName("CREATEDATE");
            this.Property(t => t.UPDATEUSER).HasColumnName("UPDATEUSER");
            this.Property(t => t.UPDATEDATE).HasColumnName("UPDATEDATE");
            this.Property(t => t.SOFTVERSION).HasColumnName("SOFTVERSION");
            this.Property(t => t.DETAILPLACE).HasColumnName("DETAILPLACE");
            this.Property(t => t.CUSTOMER).HasColumnName("CUSTOMER");
        }
    }
}
